﻿using System;
using FunctionalCLR.Core;

namespace Zove.Runtime.Diagnostics {
    public class ListFunctionsNode : FuncNode {

        public ListFunctionsNode()
            : base() {
            base.Value = "listFunctions";
        }

        public override object Evaluate() {
            foreach (string key 
                in ZoveDependencyManager.Instance.FunctionManager.Functions.Keys) {
                Console.WriteLine(key);
            }

            Console.WriteLine("{0} functions in memory.", ZoveDependencyManager.Instance.FunctionManager.Functions.Count);
            return false;
        }
    }
}
